package com.es.hr.visitorscore;

import javax.servlet.http.HttpServletRequest;

import com.es.hr.shop.ShopBiz;
import com.opensymphony.webwork.interceptor.ServletRequestAware;
import com.opensymphony.xwork.ActionSupport;

public class VisitorScoreDeleteDoAction extends ActionSupport implements ServletRequestAware{
	 HttpServletRequest request;

	public void setServletRequest(HttpServletRequest paramHttpServletRequest) {
		this.request = paramHttpServletRequest;
	}
	public String execute() throws Exception{
		String result = "";
		VisitorScoreBiz biz = new VisitorScoreBiz();
		String id = this.request.getParameter("vgid");
		
		boolean res = biz.deleteById(Integer.parseInt(id));
		if(res == true){
			String message = "删除成功";
			this.request.setAttribute("message", message);
		}else{
			String message = "删除失败，请重新删除";
			this.request.setAttribute("message", message);
		}
		result = "success";
		return result;
	}
}
